<?php
require_once '../sever/json.php';
require_once '../sever/dbhelper.php';

$pdo=DB::getInstance()->connect();

if(empty($_REQUEST['id'])){
    echo '<script>alert("缺少id")</script>';
    return;
}


$id=$_REQUEST['id'];

$sql="DELETE FROM `news` WHERE id=$id";
$count=$pdo->exec($sql);
//echo $count;
if ($count>=1){
    Responce::json('200','succss');
}